#ifndef CONNECTTHREAD_H_
#define CONNECTTHREAD_H_
#include <QDebug>
#include <QTcpSocket>
#include <QDataStream>
#include <QDate>
#include <QByteArray>
#include <QFile>
class ConnectThread : public QObject
{
    Q_OBJECT
public:
    ConnectThread(QObject * parent = 0 ,const int &socketId=0,const QString &version="",const QList<QByteArray>&fileArray=QList<QByteArray>());
    ~ConnectThread();

private:
    int socketId;
    QTcpSocket *clientSocket;
    quint64 nextBlockSize;
    QString version;
    QList <QByteArray> _fileArray;

private slots:
    void threadOver();
    void communicate();

    QString humanDisplay(int bytes);
};
#endif /* CONNECTTHREAD_H_ */
